//
//  AYSSpecialDetailCell.m
//  AiYingShiProject
//
//  Created by lanou on 15/10/27.
//  Copyright (c) 2015年 李晓理. All rights reserved.
//

#import "AYSSpecialDetailCell.h"
#import <UIImageView+WebCache.h>
@implementation AYSSpecialDetailCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
        _mainImageView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 10, SCREEN_WIDTH / 4 + 10, (SCREEN_HEIGHT - 100)/ 4  - 10)];
        _mainImageView.backgroundColor = [UIColor grayColor];
        [self.contentView addSubview:_mainImageView];
        
        _descLabel = [[UILabel alloc] initWithFrame:CGRectMake(SCREEN_WIDTH / 4  + 30, 10, SCREEN_WIDTH - (SCREEN_WIDTH / 4 + 30), 40)];
        _descLabel.textColor = [UIColor whiteColor];
        _descLabel.font = [UIFont systemFontOfSize:15];
        _descLabel.numberOfLines = 0;
        [self.contentView addSubview:_descLabel];
        
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(SCREEN_WIDTH / 4 + 30 , SCREEN_WIDTH / 4 - 30, SCREEN_WIDTH - (SCREEN_WIDTH / 4 + 20), 30)];
        _titleLabel.textColor = [UIColor whiteColor];
        _titleLabel.font = [UIFont systemFontOfSize:20];
        [self.contentView addSubview:_titleLabel];
        
        _actorLabel = [[UILabel alloc] initWithFrame:CGRectMake(SCREEN_WIDTH / 4 + 30, SCREEN_WIDTH / 4 , SCREEN_WIDTH - (SCREEN_WIDTH / 4 + 20), 40)];
        _actorLabel.textColor = [UIColor whiteColor];
        _actorLabel.numberOfLines = 0;
        [self.contentView addSubview:_actorLabel];
                                                                       
    }
    return self;
}

- (void)setDetailModel:(AYSSpecialDetialModel *)detailModel
{
    _detailModel = detailModel;
    [_mainImageView sd_setImageWithURL:[NSURL URLWithString:detailModel.vthumburl]];
    _titleLabel.text = detailModel.programname;
    _descLabel.text = detailModel.shortdesc;
    _actorLabel.text = detailModel.craw;
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
